package net.runman.web.admin;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("admin")
public class AdminController {

	/**
	 * 管理后台首页
	 * @param model
	 * @return index.jsp
	 */
	@GetMapping
	public String index(Model model) {
		return "admin/index";
	}

	/**
	 * 管理后台页面
	 * @return
	 */
	@GetMapping("{view}.html")
	public String html(@PathVariable String view) {
		return "admin/" + view;
	}
}
